<html>

<head>
    <title>{%block title %}{%endblock%}</title>

    {%if DEBUG%}
    <script src="/static/jquery-3.3.1.js"></script>
    <script src="/static/vue.js"></script>
    <script src="/static/semantic.js"></script>
    <script src="/static/jquery.cookie.js"></script>
    <link rel="stylesheet" href="/static/semantic.css">
    {%else%}
    {%if USING_SSL%}
    <script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/vue/2.5.17/vue.min.js"></script>
    <script src="https://cdn.staticfile.org/semantic-ui/2.3.3/semantic.min.js"></script>
    <script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
    <link href="https://cdn.staticfile.org/semantic-ui/2.3.3/semantic.min.css" rel="stylesheet">
    {%else%}
    <script src="http://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
    <script src="http://cdn.staticfile.org/vue/2.5.17/vue.min.js"></script>
    <script src="http://cdn.staticfile.org/semantic-ui/2.3.3/semantic.min.js"></script>
    <script src="http://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
    <link href="http://cdn.staticfile.org/semantic-ui/2.3.3/semantic.min.css" rel="stylesheet">
    {%endif%}
    {%endif%}
    <link rel="stylesheet" href="/static/style.css">
    <script src="/static/md5.js"></script>

    <script>
        function HTMLEncode(html) {
            var temp = document.createElement("div");
            (temp.textContent != null) ? (temp.textContent = html) : (temp.innerText = html);
            var output = temp.innerHTML;
            temp = null;
            return output;
        }
        function hash_md5(text) {
            return hex_md5("{{SALT}}" + String(text));
        }
        function is_number(text) {
            numbers = new Set(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]);
            text = text.trim();
            for (i in text) {
                var chr = text[i];
                console.log(chr);
                if (numbers.has(chr) == false) {
                    return false;
                }
            }
            return true;
        }
        function parseUrl(url) {
            var obj = {};
            if (url.indexOf("?") == -1 && url.indexOf("&") == -1) return {};
            var query = url.split("?")[1];
            var queryArr = query.split("&");
            queryArr.forEach(function (item) {

                var key = item.split("=")[0];
                var value = item.split("=")[1];
                obj[key] = value;
            });
            return obj;
        }
    </script>
    {%block head%}{%endblock%}
</head>

<body style="background-color: rgb(236, 233, 233)">
    <div class="ui main container" style="margin-top:70px;margin-bottom:70px">
        {%block body%}{%endblock%}
    </div>
    <div class="ui center aligned  container">
        <div style="color: darkgrey">
            Powered by MikuNotFoundException.<br>
            QQ:814980678<br>
            Created in only one day.<br>
            2018-10-15<br>
            <a href="https://gitee.com/yutong_java/music-order-web">Gitee page.</a>
        </div>
    </div>
    <div class="ui modal" id="base-message-box">
        <div class="header">消息</div>
        <div class="content">
            <p></p>
        </div>
        <div class="actions">
            <div class="ui approve button">
                确定
            </div>
        </div>
    </div>
    <div class="ui modal" id="base-error-box">
        <div class="header">消息</div>
        <div class="content">
            <p></p>
        </div>
        <div class="actions">
            <div class="ui approve button">
                确定
            </div>
        </div>
    </div>
</body>

</html>